<script language="javascript">
function logout(){
	if( confirm("Are you sure you want to logout") ) 
  		window.location = "logout.php" ;
}
</script>
<table width="80%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="80%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="31" class="blueBarborder"><table width="97%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center" class="blackTxt">Settings Menu </td>
          </tr>
        </table></td>
      </tr>
      <tr>
       <td  class="blueBarborder2" valign="top">
<div style="float: left" id="my_menu" class="sdmenu">
    <div>
        <span>Manage Pages</span>
		<a href="container.php?vu=viewcontents">Manage Pages/Add New</a>
		<?
			$s1_st_pgs = "select * from contents where 1 and parent_id='0' order by orderid";
			$q1_st_pgs = mysql_query($s1_st_pgs) or die($s1_st_pgs);
			while($r1_st_pgs = mysql_fetch_array($q1_st_pgs))
			{
		?>
			<a href="contents.php?vu=<?=$r1_st_pgs['content_title']?>&code=<?=$r1_st_pgs['id']?>" class="grayLink"><?=$r1_st_pgs["content_title"]?></a>
		<? 
			}
		?>
	</div>
		<?
			$s1_st_pgs = "select * from contents where 1 and have_child_pages=1 order by orderid";
			$q1_st_pgs = mysql_query($s1_st_pgs) or die($s1_st_pgs);
			while($r1_st_pgs = mysql_fetch_array($q1_st_pgs))
			{
			$parent_id=$r1_st_pgs["id"];
		?>
	<div>
        <span><?=$r1_st_pgs["content_title"]?></span>
		<a href="container.php?vu=Childpages&vuu=<?=$r1_st_pgs["content_title"]?>&for=<?=$r1_st_pgs["id"]?>">Manage <?=$r1_st_pgs["content_title"]?>/Add New</a>
		<?
			$s2_st_pgs = "select * from contents where 1 and parent_id = '".$parent_id."' order by orderid";
			$q2_st_pgs = mysql_query($s2_st_pgs) or die($s2_st_pgs);
			while($r2_st_pgs = mysql_fetch_array($q2_st_pgs))
			{
		?>
			<a href="child_contents.php?vu=<?=$r2_st_pgs['content_title']?>&code=<?=$r2_st_pgs['id']?>&for=<?=$r1_st_pgs['id']?>" class="grayLink"><?=$r2_st_pgs['content_title']?></a>
		<? 
			}
		?>
	</div>
		<?
			}
		?>
		<?
			$s1_st_pgs = "select * from child_contents where 1 and have_child_pages=1 order by orderid";
			$q1_st_pgs = mysql_query($s1_st_pgs) or die($s1_st_pgs);
			while($r1_st_pgs = mysql_fetch_array($q1_st_pgs))
			{
			$parent_id=$r1_st_pgs["child_id"];
		?>
	<div>
        <span><?=$r1_st_pgs["child_content_title"]?></span>
		<a href="container.php?vu=GrandChildpages&vuu=<?=$r1_st_pgs["child_content_title"]?>&for=<?=$r1_st_pgs["child_id"]?>">Manage <?=$r1_st_pgs["child_content_title"]?>/Add New</a>
		<?
			$s2_st_pgs = "select * from child_contents where 1 and child_content_id = '".$parent_id."' order by orderid";
			$q2_st_pgs = mysql_query($s2_st_pgs) or die($s2_st_pgs);
			while($r2_st_pgs = mysql_fetch_array($q2_st_pgs))
			{
		?>
			<a href="child_contents.php?vu=<?=$r2_st_pgs['child_content_title']?>&code=<?=$r2_st_pgs['child_id']?>&for=<?=$r2_st_pgs['child_content_id']?>" class="grayLink"><?=$r2_st_pgs['child_content_title']?></a>
		<? 
			}
		?>
	</div>
	<?
		}
	?>
   
	 <div>
        <span>Manage</span>
		<a href="container.php?vu=viewcategories&for=category">Categories</a>
		<a href="container.php?vu=viewclients&for=client">Clients</a>
		<a href="container.php?vu=viewmerchants&for=merchant">Merchants</a>
		<a href="container.php?vu=viewcoupons&for=coupon">Coupons</a>
    </div>
    <div>
        <span>News</span>
		<a href="container.php?vu=viewnews">Manage/Add News</a>
    </div>
   <!-- <div>
        <span>Manage FAQs</span>
		<a href="container.php?vu=viewFaq&code=1&for=FAQ">View All</a>
	</div>-->
   
	<div>
        <span>Administrator</span>
		<a href="container.php?vu=siterss" class="grayLink">Manage Site Rss Feed</a>
        <a href="container.php?vu=Homepage_images" class="grayLink">Gallery Images Info</a>
		<a href="container.php?vu=links" class="grayLink">Manage Other Site Links</a>
		<a href="container.php?vu=changepassword"  class="grayLink">Change Password/Account Info</a>
	</div>
</div>		

		

		</td>

      </tr>

    </table></td>

  </tr>

  <tr>

    <td height="6"><img src="images/spacer.gif" width="1" height="1" /></td>

  </tr>

  <tr>

    <td bgcolor="#dbedf1" class="blueBarborder2"><table width="98%"  border="0" align="center" cellpadding="4" cellspacing="0">

      <tr>

        <td class="black2">Administrator</td>

      </tr>

      <tr>

        <td class="bodyText">Copyright &copy; 2011 Weship Site | All Rights Reserved</td>

      </tr>

    </table></td>

  </tr>

  <tr>

    <td align="right"><a href="javascript:logout()"><img src="images/logout.jpg" width="53" height="19" border="0" /></a></td>

  </tr>

  <tr>

    <td align="right">&nbsp;</td>

  </tr>

</table>